// 导入axios
import axios from 'axios'


const request = axios.create({
	baseURL:'/',
	timeout:5000,
	// 设置超时时间
})

// 添加统一token
request.interceptors.request.use(function(config){
	config.headers.Authorization = 'Bearer ' + localStorage.getItem('token')
	return config
})

export default request